﻿<UserControl x:Class="IkeCode.DateTimePicker.DateTimePicker" 
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" MaxWidth="460" Height="230">
    <UserControl.Resources>
        <Style TargetType="{x:Type RadioButton}" >
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type RadioButton}">
                        <BulletDecorator Background="Transparent">
                            <BulletDecorator.Bullet>
                                <Grid Height="38" Width="55">
                                    <Rectangle Name="MainRectangle" Fill="Transparent" />
                                    <Rectangle Margin="1" Fill="#FFF7F7F7" />
                                    <Rectangle x:Name="Selected" Margin="2" Fill="LightBlue" />
                                    <ContentPresenter Name="Presenter" TextBlock.Foreground="Black" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                                </Grid>
                            </BulletDecorator.Bullet>
                        </BulletDecorator>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="true">
                                <Setter TargetName="MainRectangle" Property="Fill" Value="LightBlue"/>
                            </Trigger>
                            <Trigger Property="IsChecked" Value="false">
                                <Setter TargetName="Selected" Property="Visibility" Value="Collapsed"/>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter TargetName="Presenter" Property="TextBlock.Foreground" Value="Gray"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style TargetType="Calendar">
            <Setter Property="CalendarDayButtonStyle">
                <Setter.Value>
                    <Style TargetType="CalendarDayButton">
                        <Setter Property="FontSize" Value="19" />
                    </Style>
                </Setter.Value>
            </Setter>
        </Style>
    </UserControl.Resources>

    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <Calendar Grid.Column="0" SelectionMode="SingleDate" Name="Calendar" SelectedDatesChanged="Calendar_SelectedDatesChanged" />
        
        <Grid Grid.Column="1" x:Name="gridHours">
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
                <ColumnDefinition/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
                <RowDefinition/>
                <RowDefinition/>
                <RowDefinition/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <!--INFO: Uncomment this content only in design-->
            <!--<RadioButton Checked="rb_Checked" Grid.Column="0" Grid.Row="0" GroupName="Hours" Content="00:00" Tag="00" />
            <RadioButton Checked="rb_Checked" Grid.Column="1" Grid.Row="0" GroupName="Hours" Content="01:00" Tag="00" />
            <RadioButton Checked="rb_Checked" Grid.Column="2" Grid.Row="0" GroupName="Hours" Content="02:00" Tag="00" />
            <RadioButton Checked="rb_Checked" Grid.Column="3" Grid.Row="0" GroupName="Hours" Content="03:00" Tag="00" />

            <RadioButton Checked="rb_Checked" Grid.Column="0" Grid.Row="1" GroupName="Hours" Content="04:00" Tag="00" />
            <RadioButton Checked="rb_Checked" Grid.Column="1" Grid.Row="1" GroupName="Hours" Content="05:00" Tag="00" />
            <RadioButton Checked="rb_Checked" Grid.Column="2" Grid.Row="1" GroupName="Hours" Content="06:00" Tag="00" />
            <RadioButton Checked="rb_Checked" Grid.Column="3" Grid.Row="1" GroupName="Hours" Content="07:00" Tag="00" />

            <RadioButton Checked="rb_Checked" Grid.Column="0" Grid.Row="2" GroupName="Hours" Content="08:00" Tag="00" />
            <RadioButton Checked="rb_Checked" Grid.Column="1" Grid.Row="2" GroupName="Hours" Content="09:00" Tag="00" />
            <RadioButton Checked="rb_Checked" Grid.Column="2" Grid.Row="2" GroupName="Hours" Content="10:00" Tag="00" />
            <RadioButton Checked="rb_Checked" Grid.Column="3" Grid.Row="2" GroupName="Hours" Content="11:00" Tag="00" />

            <RadioButton Checked="rb_Checked" Grid.Column="0" Grid.Row="3" GroupName="Hours" Content="12:00" Tag="00" />
            <RadioButton Checked="rb_Checked" Grid.Column="1" Grid.Row="3" GroupName="Hours" Content="13:00" Tag="00" />
            <RadioButton Checked="rb_Checked" Grid.Column="2" Grid.Row="3" GroupName="Hours" Content="14:00" Tag="00" />
            <RadioButton Checked="rb_Checked" Grid.Column="3" Grid.Row="3" GroupName="Hours" Content="15:00" Tag="00" />

            <RadioButton Checked="rb_Checked" Grid.Column="0" Grid.Row="4" GroupName="Hours" Content="16:00" Tag="00" />
            <RadioButton Checked="rb_Checked" Grid.Column="1" Grid.Row="4" GroupName="Hours" Content="17:00" Tag="00" />
            <RadioButton Checked="rb_Checked" Grid.Column="2" Grid.Row="4" GroupName="Hours" Content="18:00" Tag="00" />
            <RadioButton Checked="rb_Checked" Grid.Column="3" Grid.Row="4" GroupName="Hours" Content="19:00" Tag="00" />

            <RadioButton Checked="rb_Checked" Grid.Column="0" Grid.Row="5" GroupName="Hours" Content="20:00" Tag="00" />
            <RadioButton Checked="rb_Checked" Grid.Column="1" Grid.Row="5" GroupName="Hours" Content="21:00" Tag="00" />
            <RadioButton Checked="rb_Checked" Grid.Column="2" Grid.Row="5" GroupName="Hours" Content="22:00" Tag="00" />
            <RadioButton Checked="rb_Checked" Grid.Column="3" Grid.Row="5" GroupName="Hours" Content="23:00" Tag="00" />-->
        </Grid>
    </Grid>
</UserControl>
